package com.yangjun.common.excel;

import java.util.List;

import org.apache.poi.ss.usermodel.HorizontalAlignment;

import com.google.common.collect.Lists;

/**
 * @ClassName ExcelDefinition
 * @Description Excel定义类
 * @author Administrator
 * @Date 2017年6月13日 下午5:06:53
 * @version 1.0.0
 */
public class ExcelDefinition {
	/**id唯一标识*/
	private String id;
	/**类名*/
	private String className;
	/**Class信息*/
	private Class<?> clazz;
	/**导出时,sheet页的名称,可以不设置*/
	private String sheetname;
	/**导出时,sheet页默认的列宽*/
	private Integer defaultColumnWidth;
	/**导出时,cell默认的对齐方式center,left,right*/
	private HorizontalAlignment defaultAlign;
	/**Field属性的全部定义*/
	private List<FieldValue> fieldValues = Lists.newArrayList();
	/**否开启导出样式支持,(数据量很大时,不建议开启),底层可能会抛出异常,具体查询底层实现WorkBook.createCellStyle*/
	private Boolean enableStyle = false;
	/**Excel 文件sheet索引，默认为0即，第一个*/
	private int sheetIndex = 0;
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public Class<?> getClazz() {
		return clazz;
	}

	public void setClazz(Class<?> clazz) {
		this.clazz = clazz;
	}

	public List<FieldValue> getFieldValues() {
		return fieldValues;
	}

	public void setFieldValues(List<FieldValue> fieldValues) {
		this.fieldValues = fieldValues;
	}

	public String getSheetname() {
		return sheetname;
	}
	
	public void setSheetname(String sheetname) {
		this.sheetname = sheetname;
	}

	public Integer getDefaultColumnWidth() {
		return defaultColumnWidth;
	}

	public void setDefaultColumnWidth(Integer defaultColumnWidth) {
		this.defaultColumnWidth = defaultColumnWidth;
	}

	public Boolean getEnableStyle() {
		return enableStyle;
	}

	public void setEnableStyle(Boolean enableStyle) {
		this.enableStyle = enableStyle;
	}

	
	
	public HorizontalAlignment getDefaultAlign() {
		return defaultAlign;
	}

	public void setDefaultAlign(HorizontalAlignment defaultAlign) {
		this.defaultAlign = defaultAlign;
	}

	public int getSheetIndex() {
		return sheetIndex;
	}
	
	public void setSheetIndex(int sheetIndex) {
		this.sheetIndex = sheetIndex;
	}
	
}
